package cc.mrbird.unit.domain;

import cc.mrbird.common.annotation.ExportConfig;

import javax.persistence.*;
import java.io.Serializable;
@Table(name="contact_infor")
public class ContactInfor implements Serializable {
    /**
     * 联络信息的主要数据内容:
     * 相关人员ID号（考虑一种编码规则，后台自动生成）、姓名、身份证号、
     * 角色（包括安全责任人、安全联络人、安全巡查人等）、家庭住址、联系电话、联系邮箱等。
     */

    private static final long serialVersionUID = 7780820231533451115L;
    @Id
    @GeneratedValue(generator = "JDBC")
    @Column(name = "relevant_id")
    @ExportConfig(value = "相关人员ID")
    private Long relevant_id;

    @Column(name = "contact_name")
    @ExportConfig(value = "联络人姓名")
    private String contact_name;

    @Column(name = "contact_card")
    @ExportConfig(value = "身份证号")
    private String contact_card;

    @Column(name = "role_id")
    private Long role_id;

    @ExportConfig(value = "角色")
    @Transient
    private String contact_role_name;

    @Column(name = "contact_address")
    @ExportConfig(value = "家庭住址")
    private String contact_address;

    @Column(name = "contact_phone")
    @ExportConfig(value = "联系电话")
    private String contact_phone;

    @Column(name = "contact_mail")
    @ExportConfig(value = "联系邮箱")
    private String contact_mail;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getRelevant_id() {
        return relevant_id;
    }

    public void setRelevant_id(Long relevant_id) {
        this.relevant_id = relevant_id;
    }

    public String getContact_name() {
        return contact_name;
    }

    public void setContact_name(String contact_name) {
        this.contact_name = contact_name;
    }

    public String getContact_card() {
        return contact_card;
    }

    public void setContact_card(String contact_card) {
        this.contact_card = contact_card;
    }

    public Long getRole_id() {
        return role_id;
    }

    public void setRole_id(Long role_id) {
        this.role_id = role_id;
    }

    public String getContact_role_name() {
        return contact_role_name;
    }

    public void setContact_role_name(String contact_role_name) {
        this.contact_role_name = contact_role_name;
    }

    public String getContact_address() {
        return contact_address;
    }

    public void setContact_address(String contact_address) {
        this.contact_address = contact_address;
    }

    public String getContact_phone() {
        return contact_phone;
    }

    public void setContact_phone(String contact_phone) {
        this.contact_phone = contact_phone;
    }

    public String getContact_mail() {
        return contact_mail;
    }

    public void setContact_mail(String contact_mail) {
        this.contact_mail = contact_mail;
    }


    @Override
    public String toString() {
        return "ContactInfor{" +
                "relevant_id=" + relevant_id +
                ", contact_name='" + contact_name + '\'' +
                ", contact_card='" + contact_card + '\'' +
                ", role_id='" + role_id + '\'' +
                ", contact_address='" + contact_address + '\'' +
                ", contact_phone='" + contact_phone + '\'' +
                ", contact_mail='" + contact_mail + '\'' +
                '}';
    }
}
